package com.loveprogrammer.eternity.model.product;

import com.loveprogrammer.eternity.enums.QualityEnum;
import com.loveprogrammer.eternity.factory.template.ThingsTemplate;

import java.util.List;

/**
 * @version 1.0.0
 * @description: 物品
 * @author: eric
 * @date: 2022-08-31 10:14
 **/
public class Things extends Goods{

    public Things(String name, String type, String desc, QualityEnum quality, int level,
                 int poisonResistance, int flameResistance, int thunderResistance, int iceResistance,
                 List<GoodsEffectTemplate> effects, int goodsId) {
        super(name,type,desc,quality,level,poisonResistance,flameResistance,thunderResistance,iceResistance,effects,goodsId);
    }

    public Things(ThingsTemplate thingsTemplate) {
        super(thingsTemplate.getName(),
                thingsTemplate.getType(),
                thingsTemplate.getDesc(),
                QualityEnum.白色,
                thingsTemplate.getId());
    }

    @Override
    public Coin sale() {
        Coin coin = new Coin();
        coin.setGoldCoin(10);
        return coin;
    }

    @Override
    public Coin price() {
        return sale();
    }
}
